const path = require("path");
const webpack = require("webpack");

module.exports = {
  entry: {
    vendors: ["vue", "pinia", "vue-router", "element-plus"],
  },
  output: {
    filename: "[name].dll.js",
    path: path.resolve(__dirname, "/dll"),
    library: "[name]",
    clean: true,
  },

  mode: "production",
  plugins: [
    new webpack.DllPlugin({
      path: path.join(__dirname, "[name].manifest.json"),
      name: "[name]",
      context: __dirname,
    }),
  ],
};
